'''
Description: 
version: 
Author: yyconion
Date: 2021-10-13 19:47:56
LastEditors: yyconion
LastEditTime: 2021-11-16 13:56:10
'''
# 赠送一个 px to rem 转换器

import re
a = 0
kongbai = ''
with open('C:/Users/24260/Desktop/xgy-front/src/views\Login.vue', 'r+', encoding="utf8") as f:
    temp = f.read()
    f.seek(0)
    f.truncate()
    test = re.sub(r': (.*?)rem', lambda x: ': ' +
                  str(float(x.group(1))/2)+'rem', temp)
    f.write(test)
